The Haight-Ashbury Free Clinic is the most popular drug treatment program in the San Francisco Bay Area, with about 1300 heroin abusers and 1700 stimulant (cocaine or methamphetamine) abusers seeking treatment annually. Because of parenteral and/or sexual practices, most of these persons are at high risk for HIV infection. We propose to enroll about 20% of this clientele in a controlled study of two key interventions: (1) medications to control "craving" (tricyclic antidepressants or amino acid precursors for stimulants, naltrexone for heroin) and (2) behavioral training to shape and reinforce safer sexual and parenteral practices. Four groups (N=154 each) of S's will receive neither, either, or both of these interventions in a 2 x 2 research design. Outcome measures will include behavioral assessment, psychological functioning, and HIV seroprevalence.